Crate zng_view_api
source ·Expand description
The View Process API.
Zng isolates all render and windowing related code to a different process (the view-process), this crate
provides the API that must be implemented to create a view-process backend, plus the Controller
that
can be used from an app-process to spawn and communicate with a view-process.
§VERSION
The VERSION
of this crate must match exactly in both App-Process and View-Process, otherwise a runtime
panic error is generated.
§Crate
This crate is part of the zng
project.
§Cargo Features
This crate provides 2 feature flags, 1 enabled by default.
§"ipc"
Enables creation of separate or pre-build view.
When this is enabled communication with the view is (de)serialized which can add a minor cost, something like a 1ms per 3MB frame request.
Enabled by default.
§"var"
Implement IntoVar<T>
for API types.
Modules§
- Accessibility and automation types.
- API extension types.
- Clipboard types.
- System config types.
- Native dialog types.
- Frame builder types.
- Font types.
- Image types.
- IPC types.
- Keyboard types.
- Mouse types.
- Touch types.
- Window, surface and frame types.
Structs§
- Identifier for a specific analog axis on some device.
- Border side line style and color.
- View Process controller, used in the App Process.
- Device ID in channel.
- Offset and color in a gradient.
- View process is online.
- Identifies a reference frame.
- Packaged API request.
- Packaged API response.
- Configuration for starting a view-process.
- View-process generation, starts at one and changes every respawn, it is never zero.
- The View-Process disconnected or has not finished initializing, try again after the inited event.
Enums§
- Pixel color alpha type.
- The line style for the sides of a widget’s border.
- System and User events sent from the View Process.
- Gradient extend mode.
- Image scaling algorithm in the renderer.
- IME preview or insert event.
- Orientation of a straight line.
- Represents a line style.
- Color mix blend mode.
- Nine-patch border repeat mode.
- Defines if a widget is part of the same 3D space as the parent.
Constants§
- The App Process and View Process must be build using the same exact version and this is validated during run-time, causing a panic if the versions don’t match.
Traits§
- The view-process API.